﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:BillsManager.Views.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Values.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="PathButtonStyle" TargetType="{x:Type Controls:PathButton}">

        <Setter Property="Width" Value="Auto" />
        <Setter Property="MinWidth" Value="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource Self}}" />

        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Padding" Value="0" />

        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{StaticResource View.Foreground.Normal}" />

        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Controls:PathButton}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                        <Path HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Data="{TemplateBinding Data}"
                              Fill="{TemplateBinding Foreground}"
                              Stretch="UniformToFill" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Style.Triggers>

            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Foreground" Value="{StaticResource View.Foreground.Disabled}" />
            </Trigger>

        </Style.Triggers>

    </Style>

</ResourceDictionary>